<?php

namespace App\models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\models\UploadFile
 *
 * @property int $id
 * @property string $md5
 * @property string $filename
 * @property string $path
 * @property string $size
 * @property string $extension
 * @property int $form_uid
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereMd5($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereFilename($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile wherePath($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereSize($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereExtension($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereFormUid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\UploadFile whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class UploadFile extends Model
{
    public static function getFilesByMd5($md5){
        return self::where('md5', $md5)->first();
    }
}
